const { Article } = require('../../model/article')
const pagination = require('mongoose-sex-page')
module.exports = async(req, res) => {
    let results = await pagination(Article).page(1).size(4).display(5).find().populate('author').exec()

    res.render('home/default', {
        results: results
    })
}